<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <%- include ../taglibs/layout_head.ejs%>
    <%- include ../taglibs/layout.css.ejs%>
    <link href="js/plugins/zTree/css/metroStyle/metroStyle.css" rel="stylesheet">
</head>
<body>
<%-include("../taglibs/header.ejs",{params:{className:"active",dataIsActive:"true"}})%>
<div class="nav-body" id="divContent">
    <div class="nav-box">
        <div class="row">
            <div class="col-sm-4 col-md-3 col-lg-2 nav-box-left-box">
                <%-include("dataManageLeftMenu.ejs",{params:{className:"active",deviceManage:"true"}})%>
            </div>
            <div class="col-sm-6 col-md-9 col-lg-10 right-container-box">
                <div class="right-container">
                    <div class="row">
                        <div class="col-sm-12">
                            <a class="back-view" id="back-view">
                                <i class="fa fa-chevron-left fa-back-left"></i>
                                返回
                            </a>
                        </div>
                    </div>
                    <section class="content content-table">
                        <div style="display: block">
                            <ol class="head-breadcrumb">
                                <li>
                                    <a>设备管理</a>
                                </li>
                                <li class="active">
                                    新增
                                </li>
                            </ol>
                            <div class="tab-box" id="deviceTab">
                                <div style="display: block" id="baseMessage">
                                    <form class="form-horizontal form-validBox" id="baseMessageForm">
                                        <input type="text" name="deptId" id="deptId" hidden="hidden">
                                        <input type="text" name="id" hidden="hidden" id="baseId">
                                        <div class="form-group">
                                            <label for="deptname" class="col-sm-2  control-label label-require">所属用户：</label>
                                            <div class="col-sm-3">
                                                <input type="text" class="form-control" id="deptname" name="deptName" style="padding-right: 54px" readonly="readonly">
                                                <button type="button" class="btn btn-theme selectUser"
                                                        style="position: absolute;top: 0px;right: 15px;">选择</button>
                                            </div>
                                            <!--<label for="role" class="col-sm-2  control-label ">车主：</label>-->
                                            <!--<div class="col-sm-3">-->
                                                <!--<input type="text" class="form-control" id="role" name="role">-->
                                            <!--</div>-->
                                            <label for="baseTerminalId" class="col-sm-2  control-label label-require">设备编号：</label>
                                            <div class="col-sm-3">
                                                <input type="text" class="form-control" id="baseTerminalId" name="baseTerminalId">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label for="accountCode" class="col-sm-2  control-label label-require">车牌号码：</label>
                                            <div class="col-sm-3">
                                               <!-- <select class="form-control" id="accountCode">
                                                    <option value="1">有线</option>
                                                    <option value="2">无线</option>
                                                </select>-->
                                                <input id="baseCarNo" name="baseCarNo" class="form-control"
                                                        type="text" aria-required="true"
                                                       aria-invalid="true">
                                            </div>
                                            <label for="startDate" class="col-sm-2  control-label label-require">车主姓名：</label>
                                            <div class="col-sm-3">
                                                <input id="userName" name="userName" class="form-control"
                                                       type="text">
                                            </div>
                                        </div>
                                        <!--<div class="form-group">-->
                                            <!--<label for="password" class="col-sm-2  control-label">设备编号：</label>-->
                                            <!--<div class="col-sm-3">-->
                                                <!--<input type="text" class="form-control" id="password" >-->
                                            <!--</div>-->
                                            <!--<label for="endDate" class="col-sm-2  control-label">车辆到期时间：</label>-->
                                            <!--<div class="col-sm-3">-->
                                                <!--<input type="text" class="form-control" id="endDate" >-->
                                            <!--</div>-->
                                        <!--</div>-->
                                        <div class="form-group">
                                            <label for="baseTerminalSim" class="col-sm-2  control-label label-require">SIM卡号：</label>
                                            <div class="col-sm-3">
                                                <input type="text" class="form-control" id="baseTerminalSim" name="baseTerminalSim">
                                            </div>
                                            <label for="baseTerminalServicePw" class="col-sm-2  control-label">服务密码：</label>
                                            <div class="col-sm-3">
                                                <input type="password" class="form-control" id="baseTerminalServicePw" name="baseTerminalServicePw">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label for="baseTerminalProtocol" class="col-sm-2  control-label label-require">设备协议：</label>
                                            <div class="col-sm-3">
                                                <select type="text" class="form-control" id="baseTerminalProtocol" name="baseTerminalProtocol">
                                                    <option value="BH-TH">
                                                        BH-TH
                                                    </option>
                                                    <option value="BH-TH1">
                                                        BH-TH1
                                                    </option>
                                                    <option value="BH-XA">
                                                        BH-XA
                                                    </option>
                                                </select>
                                            </div>
                                            <!--<label for="opName" class="col-sm-2  control-label">车辆品牌：</label>-->
                                            <!--<div class="col-sm-3">-->
                                                <!--<input type="text" class="form-control" id="opName" >-->
                                            <!--</div>-->
                                            <label for="baseProtocolType" class="col-sm-2  control-label label-require">设备型号：</label>
                                            <div class="col-sm-3">
                                                <select class="form-control" id="baseProtocolType" name="baseProtocolType">
                                                    <option value="1">有线</option>
                                                    <option value="2">无线</option>
                                                </select>
                                            </div>
                                        </div>
                                        <!--<div class="form-group">-->
                                            <!--<label for="monitorSystem" class="col-sm-2  control-label">设备型号：</label>-->
                                            <!--<div class="col-sm-3">-->
                                                <!--<select class="form-control" id="monitorSystem">-->
                                                    <!--<option value="1">型号1</option>-->
                                                    <!--<option value="2">型号2</option>-->
                                                <!--</select>-->
                                            <!--</div>-->
                                            <!--<label for="opName" class="col-sm-2  control-label">车辆颜色：</label>-->
                                            <!--<div class="col-sm-3">-->
                                                <!--<input type="text" class="form-control" id="opName" >-->
                                            <!--</div>-->
                                        <!--</div>-->
                                        <div class="form-group">
                                            <!--<label for="baseTerminalPw" class="col-sm-2  control-label">终端密钥：</label>-->
                                            <!--<div class="col-sm-3">-->
                                                <!--<input type="text" class="form-control" id="baseTerminalPw" name="baseTerminalPw">-->
                                            <!--</div>-->
                                            <!--<label for="opName" class="col-sm-2  control-label">车辆用途：</label>-->
                                            <!--<div class="col-sm-3">-->
                                                <!--<input type="text" class="form-control" id="opName" >-->
                                            <!--</div>-->
                                            <label for="baseTerminalExeType" class="col-sm-2  control-label">激活方式：</label>
                                            <div class="col-sm-3">
                                                <select class="form-control" id="baseTerminalExeType" name="baseTerminalExeType">
                                                    <option value="1">正常激活</option>
                                                    <option value="2">缴费激活</option>
                                                </select>
                                            </div>
                                            <label for="baseTerminalStatus" class="col-sm-2  control-label">设备状态：</label>
                                            <div class="col-sm-3">
                                                <select class="form-control" id="baseTerminalStatus" name="baseTerminalStatus">
                                                    <option value="1">启用</option>
                                                    <option value="2" selected>停用</option>
                                                    <option value="3">拆机</option>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <!--<label for="monitorSystem" class="col-sm-2  control-label">设备型号：</label>-->
                                            <!--<div class="col-sm-3">-->
                                                <!--<select class="form-control" id="monitorSystem">-->
                                                    <!--<option value="1">有线</option>-->
                                                    <!--<option value="2">无线</option>-->
                                                <!--</select>-->
                                            <!--</div>-->
                                            <label or="opName" class="col-sm-2  control-label">激活时间：</label>
                                            <div class="col-sm-3">
                                                <input type="text" class="laydate-icon form-control layer-date" id="baseTerminalExeTime" name="baseTerminalExeTime">
                                            </div>
                                            <label or="appPass" class="col-sm-2  control-label">APP密码：</label>
                                            <div class="col-sm-3">
                                                <input type="text" class="form-control" id="appPass" name="appPass">
                                            </div>
                                        </div>
                                        <!--<div class="form-group">-->
                                            <!--<label for="opName" class="col-sm-2  control-label">频率：</label>-->
                                            <!--<div class="col-sm-3">-->
                                                <!--<input type="text" class="form-control" id="rate" name="rate">-->
                                            <!--</div>-->
                                        <!--</div>-->
                                        <div class="form-group">
                                            <div class="col-sm-12" style="text-align: center">
                                                <button type="button" id="submitForm" class="btn btn-round btn-theme" style="width:220px">保 存</button>
                                            </div>
                                        </div>
                                    </form>
                                </div>
                                <div style="display: none" id="carMessage">
                                    <form class="form-horizontal form-validBox" id="carMessageForm">
                                        <input id="id" name="id" type="hidden">
                                        <input id="deptTwoId" name="deptId" type="hidden">
                                        <input id="baseTerminalIdTwoHidden" name="baseTerminalId" type="hidden">
                                        <!--<input  name="baseCarNo"-->
                                                <!--type="text"-->
                                               <!--hidden="hidden">-->
                                        <!--<input type="text" hidden="hidden" id="baseTerminalIdTwo" name="baseTerminalId1" >-->
                                        <!--<input  name="userName" hidden="hidden"-->
                                               <!--type="text">-->
                                        <!--<div class="form-group">
                                            <label for="last" class="col-sm-2  control-label label-require">车牌号：</label>
                                            <div class="col-sm-3">
                                                <input id="baseCarNo" name="baseCarNo" class="form-control"
                                                       placeholder="车牌号必填" type="text" aria-required="true"
                                                       aria-invalid="true">
                                            </div>
                                        </div>-->
                                        <div class="form-group">
                                            <label for="accountCode" class="col-sm-2  control-label">车牌号颜色：</label>
                                            <div class="col-sm-3">
                                                <select class="form-control m-b" id="baseCarNoColour"
                                                        name="baseCarNoColour" type="text">
                                                    <option value="黄">黄</option>
                                                    <option value="白">白</option>
                                                    <option value="蓝">蓝</option>
                                                    <option value="黑">黑</option>
                                                </select>
                                            </div>
                                            <label for="startDate" class="col-sm-2  control-label label-require">品牌车型：</label>
                                            <div class="col-sm-3">
                                                <input id="baseCarBrand" name="baseCarBrand"
                                                       class="form-control"
                                                       type="text" >
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label for="password" class="col-sm-2  control-label">车辆类型：</label>
                                            <div class="col-sm-3">
                                                <select class="form-control m-b" id="baseCarTypeId"
                                                        name="baseCarTypeId" type="select">
                                                    <option value="1">轿车</option>
                                                    <option value="2">面包车</option>
                                                    <option value="3">货车</option>
                                                </select>
                                            </div>
                                            <label for="endDate" class="col-sm-2  control-label">排量：</label>
                                            <div class="col-sm-3">
                                                <input type="text" id="baseCarOutput" name="baseCarOutput"
                                                       class="form-control" value="1"
                                                >
                                            </div>
                                        </div>
                                        <!--<div class="form-group">
                                            <label for="confirmPassWord" class="col-sm-2  control-label label-require">设备编号：</label>
                                            <div class="col-sm-3">
                                                <input type="text" class="form-control" id="baseTerminalIdTwo" name="baseTerminalId1" readonly="readonly">
                                            </div>
                                            <label for="opName" class="col-sm-2  control-label">车主姓名：</label>
                                            <div class="col-sm-3">
                                                <input id="userName" name="userName" class="form-control"
                                                       type="text">
                                            </div>
                                        </div>-->
                                        <div class="form-group">
                                            <label for="confirmPassWord" class="col-sm-2  control-label">车主电话：</label>
                                            <div class="col-sm-3">
                                                <input id="userPhone" name="userPhone" class="form-control"
                                                       type="text" >
                                            </div>
                                            <label for="opName" class="col-sm-2  control-label">车辆别名：</label>
                                            <div class="col-sm-3">
                                                <input id="baseCarName" name="baseCarName"
                                                       class="form-control"
                                                       type="text" >
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label for="confirmPassWord" class="col-sm-2  control-label">发动机号：</label>
                                            <div class="col-sm-3">
                                                <input id="baseCarFdNo" name="baseCarFdNo"
                                                       class="form-control"
                                                       type="text" >
                                            </div>
                                            <label for="opName" class="col-sm-2  control-label">机架号：</label>
                                            <div class="col-sm-3">
                                                <input id="baseCarJjNo" name="baseCarJjNo"
                                                       class="form-control"
                                                       type="text" >
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label for="confirmPassWord" class="col-sm-2  control-label">燃料类型：</label>
                                            <div class="col-sm-3">
                                                <select class="form-control m-b" id="baseCarRlType"
                                                                 name="baseCarRlType" type="text">
                                                    <option value="汽油">汽油</option>
                                                    <option value="柴油">柴油</option>
                                                    <option value="新能源">新能源</option>
                                                </select>
                                            </div>
                                            <label for="opName" class="col-sm-2  control-label">所属省份：</label>
                                            <div class="col-sm-3">
                                                <input id="baseCarOfProvince" name="baseCarOfProvince"
                                                       class="form-control"  type="text"
                                                >
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label for="confirmPassWord" class="col-sm-2  control-label">所属市区：</label>
                                            <div class="col-sm-3">
                                                <input id="baseCarOfCity" name="baseCarOfCity"
                                                       class="form-control"
                                                       type="text" >
                                            </div>
                                            <label for="opName" class="col-sm-2  control-label">初始里程：</label>
                                            <div class="col-sm-3">
                                                <input id="baseCarDis" name="baseCarDis"
                                                       class="form-control"
                                                       type="number"
                                                       number="true" maxlength="10" value="0">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label for="confirmPassWord" class="col-sm-2  control-label label-require">车辆颜色：</label>
                                            <div class="col-sm-3">
                                                <input id="baseBarColor" name="baseBarColor"
                                                       class="form-control"
                                                       type="text">
                                            </div>
                                            <label for="opName" class="col-sm-2  control-label">营运证编号：</label>
                                            <div class="col-sm-3">
                                                <input id="baseCarServiceNo" name="baseCarServiceNo"
                                                       class="form-control"
                                                       type="text">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label for="confirmPassWord" class="col-sm-2  control-label">座位数量：</label>
                                            <div class="col-sm-3">
                                                <input id="baseCarSeat" name="baseCarSeat"
                                                       class="form-control"
                                                       type="text" number="true" maxlength="2" value="5">
                                            </div>
                                            <label for="opName" class="col-sm-2  control-label">载重(吨)</label>
                                            <div class="col-sm-3">
                                                <input id="baseCarLoad" name="baseCarLoad"
                                                       class="form-control"
                                                       type="text" number="true" maxlength="3" value="0.5">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label for="confirmPassWord" class="col-sm-2  control-label">出厂日期：</label>
                                            <div class="col-sm-3">
                                                <input id="baseCarFactory" name="baseCarFactory" class="laydate-icon form-control layer-date"
                                                       type="text">
                                            </div>
                                            <label for="opName" class="col-sm-2  control-label">购买日期</label>
                                            <div class="col-sm-3">
                                                <input id="baseCarBuy" name="baseCarBuy" class="laydate-icon form-control layer-date"
                                                       type="text">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label for="confirmPassWord" class="col-sm-2  control-label">里程补偿系数：</label>
                                            <div class="col-sm-3">
                                                <input id="baseCarDisMake" name="baseCarDisMake"
                                                       class="form-control"
                                                       type="text" number="true" maxlength="4" value="0">
                                            </div>
                                            <label for="confirmPassWord" class="col-sm-2  control-label">百公里耗油：</label>
                                            <div class="col-sm-3">
                                                <input id="baseCarAvgOil" name="baseCarAvgOil"
                                                       class="form-control"
                                                       type="text" >
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label for="baseCarDriverOne" class="col-sm-2  control-label">驾驶员1：</label>
                                            <div class="col-sm-3">
                                                <input id="baseCarDriverOne" name="baseCarDriverOne"
                                                       class="form-control"
                                                       type="text" >
                                                <!--<select class="form-control" id="baseCarDriverOne" name="baseCarDriverOne">-->
                                                    <!--<option value="1">1</option>-->
                                                    <!--<option value="2">2</option>-->
                                                    <!--<option value="2">3</option>-->
                                                <!--</select>-->
                                            </div>
                                            <label for="opName" class="col-sm-2  control-label">驾驶员2：</label>
                                            <div class="col-sm-3">
                                                <input id="baseCarDriverTwo" name="baseCarDriverTwo"
                                                       class="form-control"
                                                       type="text" >
                                                <!--<select class="form-control" id="opName">-->
                                                    <!--<option value="1">1</option>-->
                                                    <!--<option value="2">2</option>-->
                                                    <!--<option value="2">3</option>-->
                                                <!--</select>-->
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <div class="col-sm-12" style="text-align: center">
                                                <button type="button" id="submitCarForm" class="btn btn-round btn-theme" style="width:220px">保 存</button>
                                            </div>
                                        </div>
                                    </form>
                                </div>
                                <div style="display: none" id="installMessage">
                                    <form class="form-horizontal form-validBox" id="installMessageForm">
                                        <input name="tId" type="hidden">
                                        <input id="baseTerminalIdTree" name="id" type="hidden">
                                        <div class="form-group">
                                            <label for="baseTerminalSetupP" class="col-sm-2 col-sm-offset-3 control-label label-require">安装人：</label>
                                            <div class="col-sm-4">
                                                <input type="text" class="form-control" id="baseTerminalSetupP" name="baseTerminalSetupPerson">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label for="baseTerminalSetupTime" class="col-sm-2 col-sm-offset-3 control-label label-require">安装时间：</label>
                                            <div class="col-sm-4">
                                                <input type="text" class="laydate-icon form-control layer-date" id="baseTerminalSetupTime" name="baseTerminalSetupTime">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label for="baseTerminalSetupPart" class="col-sm-2 col-sm-offset-3 control-label label-require">安装位置：</label>
                                            <div class="col-sm-4">
                                                <input type="text" class="form-control" id="baseTerminalSetupPart" name="baseTerminalSetupPart" >
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label for="baseTerminalSetupBusy" class="col-sm-2 col-sm-offset-3 control-label">业务人员：</label>
                                            <div class="col-sm-4">
                                                <input type="text" class="form-control" id="baseTerminalSetupBusy" name="baseTerminalSetupBusy">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label for="linkName" class="col-sm-2 col-sm-offset-3 control-label">安装地点：</label>
                                            <div class="col-sm-4">
                                                <input type="text" class="form-control" id="baseTerminalSetupAddr" name="baseTerminalSetupAddr">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label for="baseTerminalSetupLimited" class="col-sm-2 col-sm-offset-3 control-label">安装年限：</label>
                                            <div class="col-sm-4">
                                                <input type="text" class="form-control" id="baseTerminalSetupLimited" name="baseTerminalSetupLimited">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label for="linkName" class="col-sm-2 col-sm-offset-3 control-label"></label>
                                            <div class="col-sm-4" >
                                                <button type="button" id="submitInstallForm" class="btn btn-round btn-theme" style="width: 100%">保 存</button>
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </section>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="modal fade" id="myTreeDialog">
    <div class="modal-dialog" style="width: 320px;">
        <div class="modal-content" style="width: 320px;">
            <div class="modal-header">
                <button type="button" class="close" onclick="closeTreeDialog()">×</button>
                <h4 class="modal-title" id="NoPermissionModalLabel">所属用户</h4>
            </div>
            <div class="modal-body" style="height:320px;max-height:320px;max-width: 320px;
                overflow: auto;">
                <ul id="userCommonTree" class="ztree">
                </ul>
            </div>
            <div class="modal-footer">
                <button class="btn btn-info"  type="button" onclick="getAllCheckNodes()">确 定</button>
            </div>
        </div>
    </div>
</div>
<%-include ../taglibs/layout.js.ejs%>
<script src="/js/plugins/zTree/js/jquery.ztree.all-3.5.js"></script>
<script src="/js/plugins/zTree/js/jquery.ztree.exhide-3.5.js"></script>
<!--<script src="/js/ztree/ztree-cus-table.js"></script>-->
<script src="/js/ztree/ztree-cus-check.js"></script>
<script src="/js/ztree/ztree-user.js"></script>
<script type="text/javascript" src="js/viewpage/dataManage/dataManage.js"></script>
<script type="text/javascript" src="js/viewpage/dataManage/device/device.js"></script>
<!--时间-->
<script src="js/plugins/layer/laydate/laydate.js"></script>
<script type="text/javascript">
    var url = '/tree/dept';
    var _id='<%=id%>';
    var _tid = '<%=tid%>';
    $(function () {
        console.log("测试:"+_tid)
        DeviceInfo.initEditDevicePage();
//        init_tree('id', 'parentId', 'name',  fnClick,fnCheck, "checkbox");
//        loadMyTree(url);
        UserTreeComponents.initUserTree('id', 'parentId', 'name',clickTree,treeCheck, "radio");
        UserTreeComponents.loadUserTree(url,"userCommonTree",true);
        if(_id){
            queryCarInfoById(_id)
        }
        if(_tid){
            queryDeviceInfoById(_tid);
            queryInstallInfoById(_tid)
        }
    })
    function closeTreeDialog() {
        $("#myTreeDialog").modal("hide");
    }
    function clickTree(event, treeId, treeNode) {
//        debugger;
//        var flag=treeNode.checked;
//        tree_Obj.checkNode(treeNode, true, true);
//        selectTreeNode(treeNode);
    }
    function treeCheck(event, treeId, treeNode, clickFlag) {

    }

    function getAllCheckNodes() {
        var node = userTreeObj.getCheckedNodes(true)[0];
        if(node){
            $("#deptname").val(node.name);
            $("#deptId").val(node.id);
            $("#deptTwoId").val(node.id);

        }else{
            $("#deptname").val("");
            $("#deptId").val("");
        }
        closeTreeDialog();
    }
    
    function queryCarInfoById(carId) {
        $.ajax({
            url:"/editDeviceInfo/queryCarInfoById",
            type:"POST",
            data:{id:carId},
            dataType:"json"
        }).done(function (result) {
            if(result.isSuccess === true){
                var data = result.data;
                for(var k in data){
                    $("#carMessageForm").find("[name='"+k+"']").val(data[k]);
                }
            }
        })
    }
    
    function queryDeviceInfoById(tid) {
        $.ajax({
            url:"/editDeviceInfo/queryNewDeviceInfoById",
            type:"POST",
            data:{id:tid},
            dataType:"json"
        }).done(function (result) {
            if(result.isSuccess === true){
                var data = result.data;
                debugger;
                for(var k in data){
                    $("#baseMessageForm").find("[name='"+k+"']").val(data[k]);
                    $("#installMessageForm").find("[name='"+k+"']").val(data[k]);
                }
                $("#baseTerminalIdTwoHidden").val(data.id);
                $("#baseTerminalIdTwo").val($("#baseTerminalId").val());
                $("#baseTerminalIdTree").val(result.data.id);
                $("#carMessage").find("#id").val(data["carId"]);

            }
        })
    }

    function queryInstallInfoById(tid) {
        $.ajax({
            url:"/editDeviceInfo/queryDeviceInfoById",
            type:"POST",
            data:{id:tid},
            dataType:"json"
        }).done(function (result) {
            if(result.isSuccess === true){
                var data = result.data;
                for(var k in data){
                    //$("#baseMessageForm").find("[name='"+k+"']").val(data[k]);
                    $("#installMessageForm").find("[name='"+k+"']").val(data[k]);
                }
                $("#baseTerminalIdTwoHidden").val(data.id);
                $("#baseTerminalIdTwo").val($("#baseTerminalId").val());
                $("#baseTerminalIdTree").val(result.data.id);
            }
        })
    }
    
</script>
</body>
</html>